package com.bgw.boot.service;

import com.bgw.boot.dao.UserDao;
import com.bgw.boot.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author wg
 * @date 2020/9/6 22:42
 * @email 965178085@qq.com
 * @description
 */
@Service
public class UserService {

    @Autowired
    private UserDao userDao;

    public List<User> getAll() {
        return userDao.findAll();
    }

    public User getById(long id) {
        return userDao.findById(id);
    }
}
